<!---------------------------------workflow infor control begin-------------->
<%
    QueryData queryData = new QueryData(dataConn);

    String sTable = "";
    String sField = "";
    String sCond  = "";
    String sValue = "";
    String sFieldCond = "";
    String sValueCond = "";

    String table_name   = "";
    String table_field1  = "";
    String table_value1 = "";

    String type_name  = "";
    String type_SWLB  = "";
    String type_table = "";

    com.oa.workflow.FlowInfor flowInfor = new com.oa.workflow.FlowInfor();
    com.oa.workflow.Flow flowClass = new com.oa.workflow.Flow(dataConn);
    flowClass.setFlowInfor(iType);
    flowInfor = flowClass.getFlowInfor();

    type_name  = flowInfor.getName();
    type_SWLB  = flowInfor.getSWLB();
    type_table = flowInfor.getTable();
    table_name = type_table;
    /////////////////////////////////////////////////\u524D\u9762\u53D6\u5F97\u5DE5\u4F5C\u6D41\u4FE1\u606F\uFF0C\u662F\u5FC5\u8981\u7684

    ////\u53EA\u6709\u5FC5\u987B\u4FEE\u6539\uFF0C\u624D\u6709\u5FC5\u8981\u7684
    if (strACTION.equals("UPDATE")) {
        //\u5F97\u5230\u6539\u7C7B\u578B\u6240\u6709\u8981\u6C42\u5217\u51FA\u7684\u5B57\u6BB5
        sTable = "OA_GZL_ZD";
        sField = "ZDMC,ZDLX";
        sCond  = "ZDXY=0 AND ZDGZL=" + flow_type + " order by ZDSX";
        queryData.setMultRecordSet(sTable, sField, sCond);
        ResultSet rs_field = queryData.getResultSet();
        Vector vecField = new Vector();
        int j = 0;
        try {
            while (rs_field.next()) {
                    String field_name = rs_field.getString("ZDMC");
                    String field_type = rs_field.getString("ZDLX");
                    vecField.add(field_name);
                    vecField.add(field_type);
                    table_field1 += "," + field_name;
            }
        }
        catch(Exception e) {}

        Vector vecValue = new Vector(vecField.size());
        String temp = "";
        int iTemp = 0;
        String XXMB     = Convert.toSpaceStr(mySmartUpload.getRequest().getParameter("XXMB"));
        String RecordID = Convert.toSpaceStr(mySmartUpload.getRequest().getParameter("RecordID"));

        for (j=0; j< vecField.size(); j=j+2) {
            temp = Convert.toSpaceStr(mySmartUpload.getRequest().getParameter(vecField.get(j).toString()));
            if (vecField.get(j+1).toString().toLowerCase().indexOf("int")>=0) { //\u6574\u5F62
                  iTemp = 0;
                  try {
                          iTemp = Integer.parseInt(temp);
                  }
                  catch(NumberFormatException nfe) {}

                  table_value1 += "," + Integer.toString(iTemp);
            }
            else {
                  table_value1 += ",'" + temp + "'";
            }
            vecValue.add(temp);
        }
        //out.println("<br>table_field1 == "+table_field1);
        //out.println("<br>table_value1 == "+table_value1);

        /////\u5F80\u56FA\u5B9A\u8868\u6DFB\u52A0\u6570\u636E

        sTable = table_name;
        sFieldCond = "XXID";
        sValueCond = infor_id;
        /*
        out.println("<br>sTable="+sTable);
        out.println("<br>sField="+sField);
        out.println("<br>sValue ="+sValue);
        out.println("<br>sCond ="+sValueCond);
        if (true) {
            return;
        }
        */

        //////////////////////////////////////\u9644\u4EF6\uFF01
        String annex_table = "OA_GZL_FJB";  ///\u9644\u4EF6\u8868\u540D
        com.database.DataConn dataConn_annex = new com.database.DataConn();
        Annex annex = new Annex(dataConn_annex, annex_table);

        ////\u65B0\u589E\u8FD8\u662F\u4FEE\u6539\uFF1F\uFF1F\uFF1F\uFF1F
        if (infor_id.equals("0")) {
            sField = "XXYG,XXMB,RecordID" + table_field1;
            sValue = sYGID_session + ",'" + XXMB + "','" + RecordID + "'" + table_value1;

            InsertData insertData = new InsertData(dataConn);
            iReturn = insertData.insert(sTable, sField, sValue);
            iInforId = insertData.getInsertedId(sTable);
            //////////////////////////////////////\u9644\u4EF6\uFF01
            annex.add(mySmartUpload,
                      sDLZH_session,
                      "upload/workflow/",
                      iType,
                      iInforId );
        } else {
            sField = "XXMB,RecordID" + table_field1;
            sValue = "'" + XXMB + "','" + RecordID + "'" + table_value1;

            UpdateData updateData = new UpdateData(dataConn);
            iReturn = updateData.update(sTable, sField, sValue, sFieldCond, sValueCond);
            //////////////////////////////////////\u9644\u4EF6\uFF01
            String delete_FJID = Convert.toZeroStr(mySmartUpload.getRequest().getParameter("delete_FJID"));
            annex.update(mySmartUpload,
                      sDLZH_session,
                      "upload/workflow/",
                      iType,
                      iInforId,
                      delete_FJID);
        }

        ///////////////////////////////////////\u9644\u4EF6\u5173\u95ED
        if (dataConn_annex != null) {
            dataConn_annex.close();
        }

    } ////\u53EA\u6709\u5FC5\u987B\u4FEE\u6539\uFF0C\u624D\u6709\u5FC5\u8981\u7684-----------end
%>
<!---------------------------------workflow infor control end-------------->